<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>adminlogin</title>
    <!--    载入bootstrap的css模板-->
    <link rel="stylesheet" href="../bootstrap/css/bootstrap.min.css">
    <!--    导入bootstrap的js插件必须先导入，jquery-->
    <script src="../bootstrap/js/jquery/jquery.min.js"></script>
    <!--    导入bootstrap的js插件-->
    <script src="../bootstrap/js/bootstrap.min.js"></script>
    <script type="text/javascript">
        $(function () {
            $("#btn1").click(function () {
                $.post("admin.do",{
                    action:"login",
                    phone:$("#phone").val(),
                    password:$("#password").val(),
                    rememberMe:$("#rememberMe").is(":checked")
                },function (data) {
                    console.log(data)
                    if (data==="1"){
                        //location.reload();
                        location.href="http://localhost:8080/fantasy/admin/index.html";
                        //alert(1)
                    }else {
                        alert("登录失败")
                    }
                })
                return false;
            })
        })
    </script>
</head>
<body>
<div class="container">
    <div class="row ">
        <div class="col-md-12">
            <img src="" alt="">
        </div>
    </div>
    <div class="row container">
        <div class="col-md-5">
            <img class="img-responsive" src="../images/0005.jpg" alt="0005">
        </div>
        <div class="col-md-4 " >
            <form class="form-horizontal" id="loginForm">
                <h2>管理员登录</h2>
                <div class="form-group">
                    <input type="text" id="phone" class="form-control" placeholder="你的电话">
                </div>
                <div class="form-group">
                    <input type="password" id="password" class="form-control" placeholder="密码">
                </div>
                <div>
                    <lable>
                        <input type="checkbox" id="rememberMe" value="remember-me">记住我
                    </lable>
                </div>

                <button id="btn1" type="submit" class="btn btn-lg btn-primary btn-block">登录</button>
            </form>
        </div>
    </div>
</div>


</body>
</html>